package com.yejiarong.common.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author YeJR
 */
@Getter
@AllArgsConstructor
public enum ResponseCode {

    SUCCESS(200, "success"),

    BAD_REQUEST(400, "参数异常：%s"),

    UNAUTHORIZED(401, "未认证的请求"),

    FORBIDDEN(403, "请求被拒绝"),

    SERVER_ERROR(500, "服务异常，请联系管理员"),

    ES_ERROR(1011, "ES接口异常【%s】")
    ;

    private final int code;

    private final String defaultMessage;


}
